package com.bbs.services;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bbs.bean.BbsBlock;
import com.bbs.dao.BbsBlockDao;

@Transactional
@Service
public class BbsBlockManager {
	private BbsBlockDao bbsBlockDao;

	public BbsBlockDao getBbsBlockDao() {
		return bbsBlockDao;
	}

	public void setBbsBlockDao(BbsBlockDao bbsBlockDao) {
		this.bbsBlockDao = bbsBlockDao;
	}
	
	public void save(BbsBlock bbsBlock){
		bbsBlockDao.save(bbsBlock);
	}
	
	public void update(BbsBlock bbsBlock){
		bbsBlockDao.update(bbsBlock);
	}
	
	public void delete(int id){
		bbsBlockDao.deleteById(id);
	}
	
	public List findAll(){
		return bbsBlockDao.findAll();
	}
}
